Skip to content

Conversation

@laileni-aws
Copy link
Contributor

Problem

  • If user gives user input prompt more than 4096 characters, this fails at RTS as model supports only 4096 input characters.
    Value at 'userInput' failed to satisfy constraint: Member must have length less than or equal to 4096
  • Ideally we should not get more than 4096 char input from user input but still features like /test, /dev were able to get the message length more than 4096.
Trim.User.prompt.issue.mov

Solution

  • To resolve this issue, we are adding a truncation logic to continue the test generation workflow instead of failing at RTS.
  • No new tests were added as the functionality is not impacted.

  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions
Copy link

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.

@laileni-aws laileni-aws changed the title Adding truncation logic to testGen user prompt fix(amazonq): Truncating user input prompt for unit test generation. Feb 11, 2025
@laileni-aws laileni-aws marked this pull request as ready for review February 11, 2025 18:05
@laileni-aws laileni-aws requested a review from a team as a code owner February 11, 2025 18:05
@laileni-aws laileni-aws changed the title fix(amazonq): Truncating user input prompt for unit test generation. fix(amazonq): Truncating user prompt for unit test generation. Feb 11, 2025
@laileni-aws laileni-aws reopened this Feb 11, 2025
@github-actions
Copy link

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.
  • This pull request implements a feat or fix, so it must include a changelog entry (unless the fix is for an unreleased feature). Review the changelog guidelines.
    • Note: beta or "experiment" features that have active users should announce fixes in the changelog.
    • If this is not a feature or fix, use an appropriate type from the title guidelines. For example, telemetry-only changes should use the telemetry type.

@justinmk3 justinmk3 merged commit fa431af into aws:master Feb 11, 2025
26 checks passed
s7ab059789 pushed a commit to s7ab059789/aws-toolkit-vscode that referenced this pull request Feb 19, 2025
## Problem
- If user gives user input prompt more than 4096 characters, this fails
at RTS as model supports only 4096 input characters.
`Value at 'userInput' failed to satisfy constraint: Member must have
length less than or equal to 4096`
- Ideally we should not get more than 4096 char input from user input
but still features like `/test`, `/dev` were able to get the message
length more than 4096.

## Solution
- To resolve this issue, we are adding a truncation logic to continue
the test generation workflow instead of failing at RTS.
- No new tests were added as the functionality is not impacted.
@laileni-aws laileni-aws deleted the TestGen-98 branch March 19, 2025 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants